package com.wwmz.dependency.inversion.impl;

/**
 * 依赖倒置原则 面向抽象编程
 * Created by wumz on 2020/9/13 14:45
 */
public class Test {

    public static void main(String[] args) {
        //=======  v1  =======
//        Tom tom = new Tom();
//        tom.studyAICourse();
//        tom.studyJavaCourse();
//        tom.studyPythonCourse();


        //=======  v2  =======
//        Tom tom = new Tom();
//        tom.study(new JavaCourse());
//        tom.study(new PythonCourse());
//        tom.study(new AICourse());

        //=======  v3  =======
//        Tom tom = new Tom(new JavaCourse());
//        tom.study();

        //=======  V4  =======
        Tom tom = new Tom();
        tom.setiCourse(new JavaCourse());
        tom.study();
    }
}
